//
//  BottomView.h
//  TraceViewer
//
//  Created by Vladimir Sarpe on 24/06/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <TopView.h>


@interface BottomView : NSView {
	NSMutableArray* graphSends;
	NSMutableArray* graphSpawns;
	NSMutableArray* graphDies;	
	NSMutableArray* rawSends;
	NSMutableArray* rawSpawns;
	NSMutableArray* rawDies;
	NSBezierPath* sendp;
	NSBezierPath* diep;
	NSBezierPath* spawnp;
	NSRect frameRect;
	NSRect selector;
	NSRect prevRect;
	NSRect selector_border;
	NSPoint lastDragLocation;
	NSPoint location;
	BOOL dragging;
	BOOL initdraw;
	float k;
	float zoom;
	float prevPos;
	int scale;
	int max;
	int staticWidth;
	int selectorWidth;
	int selectorHeight;
	int lastevent;
	//int point_distance;
	
	IBOutlet TopView* topView;
}

-(void)mouseDown:(NSEvent *)event;
-(BOOL)isPointInItem:(NSPoint)testPoint;
-(BOOL)acceptsFirstResponder;
-(void)mouseDragged:(NSEvent *)event;
- (void)newLocationByX:(float)x;
-(BOOL)isOpaque;
-(void)loadSends:(NSMutableArray *)send andSpawn:(NSMutableArray *)spawn andDie:(NSMutableArray *)die andLast:(NSString*) last;
-(void)notifyZoom:(float)z;
-(void)validateSelector;
-(NSMutableArray*)graphStats:(NSMutableArray *)data;
-(void) drawGraphs: (NSMutableArray*) sends andSpawns:(NSMutableArray*) spawns andDies:(NSMutableArray*) dies;
-(NSBezierPath*) drawPath:(NSMutableArray*) data;

@end
